﻿@model IEnumerable<KM.ENT.entSanPham>
@using CORE;
<div class="content_items">
    <div class="content_items_header">
        <a href="@Url.Action("Danhsach", null, new { Id = ViewBag.Id, Name = ViewBag.Name })" title="">
            Sản phẩm cùng loại
            »
        </a>
    </div>

    @{
        int dem = 1;
        string cssclass = "";
        foreach (var item in Model)
        {
            switch (dem)
            {
                case 1:
                    cssclass = "";
                    dem = 2;
                    break;
                case 2:
                    cssclass = "item_pub_mid";
                    dem = 3;
                    break; ;
                case 3:
                    cssclass = "";
                    dem = 1;
                    break;

            }
            <div class="item_pub @cssclass">
                <div class="item_image">
                    <a href="@Url.Action("chitiet", "sanpham", new {id=item.Id, Name=Utils.GetTitle(@item.TenSanPham)})" title="@item.TenSanPham">
                        <img width="221" height="279" class="clsImage" src="/images/@item.Image" alt="@item.TenSanPham" title="@item.TenSanPham">
                    </a>
                    <p class="pub_image_more">
                        <a href="@Url.Action("chitiet", "sanpham", new {id=item.Id, Name=Utils.GetTitle(@item.TenSanPham)})" title="@item.TenSanPham"></a>
                    </p>
                    <p class="pub_image_button">
                        <a href="@Url.Action("chitiet", "sanpham", new {id=item.Id, Name=Utils.GetTitle(@item.TenSanPham)})" title="@item.TenSanPham">XEM NGAY</a>
                    </p>
                    <p class="pub_special">
                    </p>
                    <p>
                    </p>
                </div>
                <div class="item_info">
                    <div class="info_manu">
                        <span><a href="@Url.Action("chitiet", "sanpham", new {id=item.Id, Name=Utils.GetTitle(@item.TenSanPham)})" title="@item.TenSanPham">@item.TenSanPham</a></span>
                    </div>
                    @*<div class="info_title">
                            <strong><a href="@Url.Action("chitiet", "sanpham", new {id=item.Id })" title="Đầm Vintage Hoa">@item.TenSanPham</a></strong>
                        </div>*@
                    <div class="info_price">
                        <p class="pub_price2">
                            @{
            if (@item.GiaBan == 0)
            {
                <span>Liên hệ</span>
            }
            else
            {
                <span>@item.GiaBan<span class="text_small">đ</span></span>
            }
                            }

                        </p>
                        <p class="pub_price1">
                            <span class="line_through"></span>
                        </p>
                        <p class="pub_code">
                            <span>Mã: R@{@item.Id}</span>
                        </p>
                    </div>
                </div>
            </div>

        }
    }

</div>